//package com.x.processplatform.assemble.designer.jaxrs.projection;
//
//import java.util.List;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.ws.rs.Consumes;
//import javax.ws.rs.DELETE;
//import javax.ws.rs.GET;
//import javax.ws.rs.POST;
//import javax.ws.rs.PUT;
//import javax.ws.rs.Path;
//import javax.ws.rs.PathParam;
//import javax.ws.rs.Produces;
//import javax.ws.rs.container.AsyncResponse;
//import javax.ws.rs.container.Suspended;
//import javax.ws.rs.core.Context;
//import javax.ws.rs.core.MediaType;
//
//import com.google.gson.JsonElement;
//import com.x.base.core.project.annotation.JaxrsDescribe;
//import com.x.base.core.project.annotation.JaxrsMethodDescribe;
//import com.x.base.core.project.annotation.JaxrsParameterDescribe;
//import com.x.base.core.project.http.ActionResult;
//import com.x.base.core.project.http.EffectivePerson;
//import com.x.base.core.project.http.HttpMediaType;
//import com.x.base.core.project.jaxrs.ResponseFactory;
//import com.x.base.core.project.jaxrs.StandardJaxrsAction;
//import com.x.base.core.project.logger.Logger;
//import com.x.base.core.project.logger.LoggerFactory;
//
//@Path("projection")
//@JaxrsDescribe("数据映射")
//public class ProjectionAction extends StandardJaxrsAction {
//
//	private static Logger logger = LoggerFactory.getLogger(ProjectionAction.class);
//
//	@JaxrsMethodDescribe(value = "列示数据映射对象,下一页.", action = ActionListNext.class)
//	@GET
//	@Path("list/{id}/next/{count}")
//	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
//	@Consumes(MediaType.APPLICATION_JSON)
//	public void listNext(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
//			@JaxrsParameterDescribe("标识") @PathParam("id") String id,
//			@JaxrsParameterDescribe("数量") @PathParam("count") Integer count) {
//		ActionResult<List<ActionListNext.Wo>> result = new ActionResult<>();
//		EffectivePerson effectivePerson = this.effectivePerson(request);
//		try {
//			result = new ActionListNext().execute(effectivePerson, id, count);
//		} catch (Exception e) {
//			logger.error(e, effectivePerson, request, null);
//			result.error(e);
//		}
//		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
//	}
//
//	@JaxrsMethodDescribe(value = "列示数据映射对象,上一页.", action = ActionListPrev.class)
//	@GET
//	@Path("list/{id}/prev/{count}")
//	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
//	@Consumes(MediaType.APPLICATION_JSON)
//	public void listPrev(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
//			@JaxrsParameterDescribe("标识") @PathParam("id") String id,
//			@JaxrsParameterDescribe("数量") @PathParam("count") Integer count) {
//		ActionResult<List<ActionListPrev.Wo>> result = new ActionResult<>();
//		EffectivePerson effectivePerson = this.effectivePerson(request);
//		try {
//			result = new ActionListPrev().execute(effectivePerson, id, count);
//		} catch (Exception e) {
//			logger.error(e, effectivePerson, request, null);
//			result.error(e);
//		}
//		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
//	}
//
//	@JaxrsMethodDescribe(value = "获取单个数据映射对象.", action = ActionGet.class)
//	@GET
//	@Path("{flag}")
//	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
//	@Consumes(MediaType.APPLICATION_JSON)
//	public void get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
//			@JaxrsParameterDescribe("标识") @PathParam("flag") String flag) {
//		ActionResult<ActionGet.Wo> result = new ActionResult<>();
//		EffectivePerson effectivePerson = this.effectivePerson(request);
//		try {
//			result = new ActionGet().execute(effectivePerson, flag);
//		} catch (Exception e) {
//			logger.error(e, effectivePerson, request, null);
//			result.error(e);
//		}
//		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
//	}
//
//	@JaxrsMethodDescribe(value = "执行数据映射.", action = ActionExecute.class)
//	@GET
//	@Path("{flag}/execute")
//	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
//	@Consumes(MediaType.APPLICATION_JSON)
//	public void execute(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
//			@JaxrsParameterDescribe("标识") @PathParam("flag") String flag) {
//		ActionResult<ActionExecute.Wo> result = new ActionResult<>();
//		EffectivePerson effectivePerson = this.effectivePerson(request);
//		try {
//			result = new ActionExecute().execute(effectivePerson, flag);
//		} catch (Exception e) {
//			logger.error(e, effectivePerson, request, null);
//			result.error(e);
//		}
//		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
//	}
//
//	@JaxrsMethodDescribe(value = "创建数据映射.", action = ActionCreate.class)
//	@POST
//	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
//	@Consumes(MediaType.APPLICATION_JSON)
//	public void create(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
//			JsonElement jsonElement) {
//		ActionResult<ActionCreate.Wo> result = new ActionResult<>();
//		EffectivePerson effectivePerson = this.effectivePerson(request);
//		try {
//			result = new ActionCreate().execute(effectivePerson, jsonElement);
//		} catch (Exception e) {
//			logger.error(e, effectivePerson, request, jsonElement);
//			result.error(e);
//		}
//		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
//	}
//
//	@JaxrsMethodDescribe(value = "删除数据映射对象.", action = ActionDelete.class)
//	@DELETE
//	@Path("{flag}")
//	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
//	@Consumes(MediaType.APPLICATION_JSON)
//	public void delete(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
//			@JaxrsParameterDescribe("标识") @PathParam("flag") String flag) {
//		ActionResult<ActionDelete.Wo> result = new ActionResult<>();
//		EffectivePerson effectivePerson = this.effectivePerson(request);
//		try {
//			result = new ActionDelete().execute(effectivePerson, flag);
//		} catch (Exception e) {
//			logger.error(e, effectivePerson, request, null);
//			result.error(e);
//		}
//		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
//	}
//
//	@JaxrsMethodDescribe(value = "更新数据映射.", action = ActionEdit.class)
//	@PUT
//	@Path("{flag}")
//	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
//	@Consumes(MediaType.APPLICATION_JSON)
//	public void edit(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
//			@JaxrsParameterDescribe("标识") @PathParam("flag") String flag, JsonElement jsonElement) {
//		ActionResult<ActionEdit.Wo> result = new ActionResult<>();
//		EffectivePerson effectivePerson = this.effectivePerson(request);
//		try {
//			result = new ActionEdit().execute(effectivePerson, flag, jsonElement);
//		} catch (Exception e) {
//			logger.error(e, effectivePerson, request, jsonElement);
//			result.error(e);
//		}
//		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
//	}
//
//	@JaxrsMethodDescribe(value = "根据应用获取数据映射.", action = ActionListWithApplication.class)
//	@GET
//	@Path("list/application/{applicationFlag}")
//	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
//	@Consumes(MediaType.APPLICATION_JSON)
//	public void listWithApplication(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
//			@JaxrsParameterDescribe("应用标识") @PathParam("applicationFlag") String applicationFlag) {
//		ActionResult<List<ActionListWithApplication.Wo>> result = new ActionResult<>();
//		EffectivePerson effectivePerson = this.effectivePerson(request);
//		try {
//			result = new ActionListWithApplication().execute(effectivePerson, applicationFlag);
//		} catch (Exception e) {
//			logger.error(e, effectivePerson, request, null);
//			result.error(e);
//		}
//		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
//	}
//
//}